angular.module('loginModule', ['ionic'])
	.controller('loginCtrl', function($scope,login,$state) {
		$scope.router=$state.params;
		login.getHomeData()
			.then(function(data) {
				$scope.Topimg=data.data.data.topImage
				console.log(data.data.data.topImage.image)
			})
	})
	.factory('login', function($http,$state) {
		var getHomeData = function() {		
			return $http.get("/icy/m.php?method=userinfo.getPreRegImage")
				.then(function(data) {
					return data;
				});
		};

		return {
			getHomeData: getHomeData
		};
	})